package com.onepiece.metrics;

/**
 * 系统内自定义指标
 *
 * @author guoyanjiang
 * @date 2019-04-28
 */
public enum CustomMetricsEnum {

    REDIS_LATENCY("redis_latency", "Redis操作耗时"),
    REDIS_EXCEPTION_TOTAL("redis_exception_total", "Redis异常数"),
    DB_LATENCY("db_latency", "DB操作耗时"),
    DB_EXCEPTION_TOTAL("db_exception_total", "DB异常数"),
    KLINE_LATENCY("kline_latency", "最新K线延时"),
    TRADE_LATENCY("trade_latency", "最新历史成交延时"),
    TRADE_NOTRECEIVE_LATENCY("trade_notreceive_latency", "多久没有收到成交的延时"),
    TRADE_LATENCY_BROAD("trade_latency_broad", "最新历史成交延时广播前"),
    TRADE_NOTRECEIVE_LATENCY_BROAD("trade_notreceive_latency_broad", "多久没有收到成交的延时广播前"),
    COMMON_EXCEPTION_TOTAL("common_exception_total", "统一异常处理的异常数"),
    OUTSIDE_API_LATENCY("outside_api_latency", "外部API耗时"),
    OUTSIDE_API_EXCEPTION_TOTAL("outside_api_exception_total", "外部API异常数"),
    HTTP_REQUESTS_HEALTH_TOTAL("http_requests_health_total", "延迟<100ms的200请求数"),
    TASK_TRIGGER_FAIL_TOTAL("task_trigger_fail_total", "定时任务触发失败数"),
    TASK_EXECUTOR_FAIL_TOTAL("task_executor_fail_total", "定时任务执行失败数"),
    CALL_MICRO_API_LATENCY("call_micro_api_latency", "微服务调用耗时"),
    ;

    public String name;
    public String help;

    CustomMetricsEnum(String name, String help) {
        this.name = name;
        this.help = help;
    }

}
